//
//  BanKaUserNewsController.m
//  PosApp
//
//  Created by 刘萍 on 2018/9/8.
//  Copyright © 2018年 李英新. All rights reserved.
//

#import "BanKaUserNewsController.h"
#import "YHWEBController.h"

@interface BanKaUserNewsController ()
@property (weak, nonatomic) IBOutlet UITextField *CardUserName;
@property (weak, nonatomic) IBOutlet UITextField *CardUseriPhone;
@property (weak, nonatomic) IBOutlet UITextField *CardUserSFNumg;

@end

@implementation BanKaUserNewsController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.navigationItem.title = @"基本信息";
    self.CardUseriPhone.keyboardType = UIKeyboardTypeNumberPad;
    
    
}
- (IBAction)ClickOnBtnOfBankaUserNewsControllerToNextController:(id)sender {
    
    NSMutableDictionary * dic = [[NSMutableDictionary alloc] init];
    [dic setObject:KUserID forKey:@"member_id"];
    [dic setObject:self.BankID forKey:@"bank_id"];
    [dic setObject:self.BankName forKey:@"bank_name"];
    [dic setObject:self.CardUserName.text forKey:@"name"];
    [dic setObject:self.CardUseriPhone.text forKey:@"phone"];
    [dic setObject:self.CardUserSFNumg.text forKey:@"idcard"];
    
    [dic setObject:self.bank_pj forKey:@"bank_pj"];
    
    [MainObjectWay PostWithMethod:@"handle_submit" andAction:@"Handle" andAddParam:YES parameters:dic success:^(id responseObject) {
        NSLog(@"提交结果 = %@",responseObject);
        if ([MainObjectWay IsSucceedWithCode:responseObject[@"code"]]) {
            YHWEBController * WebC = [[YHWEBController alloc] init];
            WebC.title = self.BankName;
            WebC.WebStr = [NSString stringWithFormat:@"%@",responseObject[@"data"][@"url"]];
            [self.navigationController pushViewController:WebC animated:YES];
            
        }
    } failure:^(NSError *error) {
        NSLog(@"错误信息 = %@",error);
    }];
    [MBProgressHUD showAlertViewWithText:@"资料提交"];
}

-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    [self.view endEditing:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
